package com.woniu.sso_jwt.jwtresult;

import io.jsonwebtoken.Claims;

import java.io.Serializable;
    //用于返回的结果对象
public class JWTResult implements Serializable {
    //错误编码，在jwtutil中定义的常量，200为正确
    private  int errCode;
    //是否成功，代表结果的状态
    private boolean success;
    //公开数据
    private Claims claims;

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Claims getClaims() {
        return claims;
    }

    public void setClaims(Claims claims) {
        this.claims = claims;
    }

    public JWTResult() {
    }

    public JWTResult(int errCode, boolean success, Claims claims) {
        this.errCode = errCode;
        this.success = success;
        this.claims = claims;
    }
}
